home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trusted Irix /B 4.0.4
/
Trusted-Irix B-4.0.1.iso
/
dist
/
eoe1.idb
/
usr
/
include
/
sys
/
flock.h.z
/
flock.h
Wrap
C/C++ Source or Header
|
1992-04-03
|
2KB
|
59 lines
/* Copyright (c) 1984 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ident "$Revision: 3.4 $"
#ifndef __SYS_FLOCK_H__
#define __SYS_FLOCK_H__
#include "sys/fcntl.h"
#include "sys/sema.h"
#define INOFLCK 1 /* Inode is locked when reclock() is called. */
#define SETFLCK 2 /* Set a file lock. */
#define SLPFLCK 4 /* Wait if blocked. */
#define SETBSDFLCK 8 /* Set a Berkeley record lock. */
#define USE_PID 1 /* use epid when cleaning locks */
#define IGN_PID 2 /* ignore epid when cleaning locks */
/* file locking structure (connected to inode) */
#define l_end l_len
#define MAXEND 017777777777
struct filock {
struct flock set; /* contains type, start, and end */
union {
int wakeflg; /* for locks sleeping on this one */
struct {
short sysid;
short pid;
} blk; /* for sleeping locks only */
} stat;
sema_t wakesem;
struct filock *prev;
struct filock *next;
};
/* file and record locking configuration structure */
/* record use total may overflow */
struct flckinfo {
long recs; /* number of records configured on system */
long reccnt; /* number of records currently in use */
long recovf; /* number of times system ran out of record locks. */
long rectot; /* number of records used since system boot */
};
#ifdef _KERNEL
extern struct flckinfo flckinfo;
extern struct filock flox[];
#endif /* _KERNEL */
#endif /* __SYS_FLOCK_H__ */